package com.htl.exampro.course.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 课程表
 * </p>
 *
 * @author hehehe
 * @since 2025-05-26
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@Schema(name = "CourseVO", description = "课程表")
public class CourseVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 课程ID
     */
    @Schema(description = "课程ID")
    private String courseId;

    /**
     * 课程代码
     */
    @Schema(description = "课程代码")
    private String courseCode;

    /**
     * 课程名称
     */
    @Schema(description = "课程名称")
    private String courseName;

    /**
     * 老师姓名
     */
    @Schema(description = "老师姓名")
    private String teacherName;

    /**
     * 课程说明（如：包含章节范围、题型分布等）
     */
    @Schema(description = "课程说明（如：包含章节范围、题型分布等）")
    private String description;

    /**
     * 时长范围
     */
    @Schema(description = "时长范围")
    private Integer duration;
    /**
     * 开课时间
     */
    @Schema(description = "开课时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 最大选课人数限制
     */
    @Schema(description = "最大选课人数限制")
    private Integer maxStudents;

    /**
     * 课程封面
     */
    @Schema(description = "课程封面")
    private String cover;
    /**
     * 级别
     */
    @Schema(description = "级别")
    private String level;
    /**
     * 学科分类
     */
    @Schema(description = "学科分类")
    private String subject;
    /**
     * 平均评分
     */
    @Schema(description = "平均评分")
    private BigDecimal rating;

    /**
     * 评分人数
     */
    @Schema(description = "评分人数")
    private Integer ratingCount;

    /**
     * 学习人数
     */
    @Schema(description = "学习人数")
    private Integer studentCount;

    /**
     * 课程状态: 1-活跃 2-停用 3-归档
     */
    @Schema(description = "课程状态: 1-活跃 2-停用 3-归档")
    private Byte status;

    /**
     * 是否公开(0私有/1公开)
     */
    @Schema(description = "是否公开(0私有/1公开)")
    private Boolean isPublic;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID")
    private String createdPerson;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    /**
     * 修改人ID
     */
    @Schema(description = "修改人ID")
    private String updatedPerson;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;
}
